<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
*/

/**
 * Description of RecordNotExists
 *
 * @author chaporgin_a
 */
class VA_Form_Validator_RecordExists extends VA_Form_Validator_RecordNotExists {

  public function isValid($value) {
    $res = $this->askDatabase($value);
    if((count($res) == 0) || ($res[0] > 0))
      return TRUE;
    $this->errorMessages[] = 'Не существует!';
    return FALSE;
  }

}

